3.5.14 \(\int \frac {1}{\sqrt {x^{2-n} (a-b x^n)}} \, dx\) [414]

Optimal. Leaf size=38 \[ \frac {2 \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {-b x^2+a x^{2-n}}}\right )}{\sqrt {b} n} \]

[Out]

2*arctan(x*b^(1/2)/(-b*x^2+a*x^(2-n))^(1/2))/n/b^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 38, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.150, Rules used = {2004, 2033, 209} \begin {gather*} \frac {2 \text {ArcTan}\left (\frac {\sqrt {b} x}{\sqrt {a x^{2-n}-b x^2}}\right )}{\sqrt {b} n} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[1/Sqrt[x^(2 - n)*(a - b*x^n)],x]

[Out]

(2*ArcTan[(Sqrt[b]*x)/Sqrt[-(b*x^2) + a*x^(2 - n)]])/(Sqrt[b]*n)

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 2004

Int[(u_)^(p_), x_Symbol] :> Int[ExpandToSum[u, x]^p, x] /; FreeQ[p, x] && GeneralizedBinomialQ[u, x] &&  !Gene
ralizedBinomialMatchQ[u, x]

Rule 2033

Int[1/Sqrt[(a_.)*(x_)^2 + (b_.)*(x_)^(n_.)], x_Symbol] :> Dist[2/(2 - n), Subst[Int[1/(1 - a*x^2), x], x, x/Sq
rt[a*x^2 + b*x^n]], x] /; FreeQ[{a, b, n}, x] && NeQ[n, 2]

Rubi steps

\begin {align*} \int \frac {1}{\sqrt {x^{2-n} \left (a-b x^n\right )}} \, dx &=\int \frac {1}{\sqrt {-b x^2+a x^{2-n}}} \, dx\\ &=\frac {2 \text {Subst}\left (\int \frac {1}{1+b x^2} \, dx,x,\frac {x}{\sqrt {-b x^2+a x^{2-n}}}\right )}{n}\\ &=\frac {2 \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {-b x^2+a x^{2-n}}}\right )}{\sqrt {b} n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(78\) vs. \(2(38)=76\).
time = 0.06, size = 78, normalized size = 2.05 \begin {gather*} \frac {2 \sqrt {a} x^{1-\frac {n}{2}} \sqrt {1-\frac {b x^n}{a}} \sin ^{-1}\left (\frac {\sqrt {b} x^{n/2}}{\sqrt {a}}\right )}{\sqrt {b} n \sqrt {x^{2-n} \left (a-b x^n\right )}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[1/Sqrt[x^(2 - n)*(a - b*x^n)],x]

[Out]

(2*Sqrt[a]*x^(1 - n/2)*Sqrt[1 - (b*x^n)/a]*ArcSin[(Sqrt[b]*x^(n/2))/Sqrt[a]])/(Sqrt[b]*n*Sqrt[x^(2 - n)*(a - b
*x^n)])

________________________________________________________________________________________

Maple [F]
time = 0.08, size = 0, normalized size = 0.00 \[\int \frac {1}{\sqrt {x^{2-n} \left (a -b \,x^{n}\right )}}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(x^(2-n)*(a-b*x^n))^(1/2),x)

[Out]

int(1/(x^(2-n)*(a-b*x^n))^(1/2),x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(x^(2-n)*(a-b*x^n))^(1/2),x, algorithm="maxima")

[Out]

integrate(1/sqrt(-(b*x^n - a)*x^(-n + 2)), x)

________________________________________________________________________________________

Fricas [A]
time = 1.92, size = 106, normalized size = 2.79 \begin {gather*} \left [-\frac {\sqrt {-b} \log \left (-\frac {2 \, b x x^{n} - a x - 2 \, \sqrt {-b} x^{n} \sqrt {-\frac {b x^{2} x^{n} - a x^{2}}{x^{n}}}}{x}\right )}{b n}, -\frac {2 \, \arctan \left (\frac {\sqrt {-\frac {b x^{2} x^{n} - a x^{2}}{x^{n}}}}{\sqrt {b} x}\right )}{\sqrt {b} n}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(x^(2-n)*(a-b*x^n))^(1/2),x, algorithm="fricas")

[Out]

[-sqrt(-b)*log(-(2*b*x*x^n - a*x - 2*sqrt(-b)*x^n*sqrt(-(b*x^2*x^n - a*x^2)/x^n))/x)/(b*n), -2*arctan(sqrt(-(b
*x^2*x^n - a*x^2)/x^n)/(sqrt(b)*x))/(sqrt(b)*n)]

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {1}{\sqrt {x^{2 - n} \left (a - b x^{n}\right )}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(x**(2-n)*(a-b*x**n))**(1/2),x)

[Out]

Integral(1/sqrt(x**(2 - n)*(a - b*x**n)), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(x^(2-n)*(a-b*x^n))^(1/2),x, algorithm="giac")

[Out]

integrate(1/sqrt(-(b*x^n - a)*x^(-n + 2)), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.03 \begin {gather*} \int \frac {1}{\sqrt {x^{2-n}\,\left (a-b\,x^n\right )}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(x^(2 - n)*(a - b*x^n))^(1/2),x)

[Out]

int(1/(x^(2 - n)*(a - b*x^n))^(1/2), x)

________________________________________________________________________________________